package com.sikaryofficial.knowledge.config;

import org.neo4j.driver.Driver;
import org.springframework.boot.actuate.neo4j.Neo4jHealthIndicator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : qinjinyuan
 * @desc : Neo4j配置
 * @date : 2024/03/22 11:39
 */
@Configuration
public class Neo4jConfig {
    @Bean
    public Neo4jHealthIndicator neo4jHealthContributor(Driver driver) {
        return new Neo4jHealthIndicator(driver);
    }

    /*@Value("${spring.data.neo4j.uri}")
    private String url;

    @Value("${spring.data.neo4j.username}")
    private String username;

    @Value("${spring.data.neo4j.password}")
    private String password;

    @Bean(name = "session")
    public Session neo4jSession() {
        Driver driver = GraphDatabase.driver(url, AuthTokens.basic(username, password));
        return driver.session();
    }*/

}
